From 23426b0f39ad66aa2dbc74e036bd80b3116ac48e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 21 Jan 2020 18:09:43 -0500 Subject: [PATCH] Fix testsuite without -Dprofiler=true Only build and run the performance tests if we have sysprof. --- tests/meson.build | 8 ++++---- testsuite/css/performance/meson.build | 14 ++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index e7aa88ce87..a62924d050 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -150,9 +150,9 @@ foreach t: gtk_tests dependencies: [libgtk_dep, libm]) endforeach - - -executable('testperf', 'testperf.c', - dependencies: [profiler_dep, platform_gio_dep, libm]) +if get_option('profiler') + executable('testperf', 'testperf.c', + dependencies: [profiler_dep, platform_gio_dep, libm]) +endif subdir('visuals') diff --git a/testsuite/css/performance/meson.build b/testsuite/css/performance/meson.build index 5a6a40ded2..afceb45d26 100644 --- a/testsuite/css/performance/meson.build +++ b/testsuite/css/performance/meson.build @@ -1,7 +1,9 @@ -test_css_performance = executable('test-css-performance', 'test-css-performance.c', - dependencies: [profiler_dep, platform_gio_dep, libm]) +if get_option ('profiler') + test_css_performance = executable('test-css-performance', 'test-css-performance.c', + dependencies: [profiler_dep, platform_gio_dep, libm]) -test('performance', test_css_performance, - args: [ join_paths(meson.current_build_dir(), '../../../demos/widget-factory/gtk4-widget-factory') ], - env: [ 'GTK_THEME=Adwaita' ], - suite: [ 'css' ]) + test('performance', test_css_performance, + args: [ join_paths(meson.current_build_dir(), '../../../demos/widget-factory/gtk4-widget-factory') ], + env: [ 'GTK_THEME=Adwaita' ], + suite: [ 'css' ]) +endif -- 2.30.2